

package com.dog.basics.bean.dto.admin.sys;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author guonh
 * @since 2017-10-29
 */
@Data
@ApiModel(value = "用户")
public class AdminSysUserAddDto implements Serializable {

    /**
     * 用户名(登录名)
     */
    @NotBlank(message = "用户名(登录名)不能为空")
    @ApiModelProperty(value = "用户名(登录名)(50)", dataType = "String", required = true)
    @Size(min = 1, max = 50, message = "用户名(登录名)长度 1-50")
    private String username;

    /**
     * 用户昵称名称
     */
    @NotBlank(message = "昵称不能为空")
    @ApiModelProperty(value = "用户昵称(50)", dataType = "String", required = true)
    @Size(min = 1, max = 50, message = "昵称长度 1-50")
    private String name;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码(20)", dataType = "String", required = true)
    @Size(min = 1, max = 20, message = "密码长度 1-20")
    private String password;


    /**
     * 锁定标记,0:正常,9:已锁定
     */
    @NotNull(message = "锁定标记不能为空")
    @ApiModelProperty(value = "锁定标记,0:正常,9:已锁定", dataType = "Integer", required = true)
    private Integer lockFlag;

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空")
    @ApiModelProperty(value = "手机号(20)", dataType = "String", required = true)
    @Size(min = 1, max = 20, message = "手机号长度 1-20")
    private String phone;

    /**
     * 部门ID
     */
    @ApiModelProperty(value = "用户所属部门id", dataType = "Long", required = false)
    private Long deptId;

    /**
     * 租户ID
     */
    @ApiModelProperty(value = "所属租户", dataType = "Long", required = false)
    private Long tenantId;

    /**
     * 角色ID
     */
    @NotEmpty(message = "角色id集合不能为空")
    @ApiModelProperty(value = "角色id集合", dataType = "List<Long>", required = true)
    private List<Long> role;

    /**
     * 基础信息
     */
    /*@NotNull(message = "基础信息不能为空")*/
    @ApiModelProperty(value = "基础信息",dataType = "AdminSysUserInfoAddDto")
    private AdminSysUserInfoAddDto userInfoDto;

}
